package com.example.shoppingmall.dao;

import com.example.shoppingmall.pojo.StoreClerk;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface StoreClerkMapper {

    //查询当前店铺的店员+分页
    public List<StoreClerk> stcList(@Param("store_id") Integer store_id, @Param("pageNo") Integer pageNo, @Param("pageNum") Integer pageNum);

    //查询总条数
    public int total(@Param("store_id") Integer store_id);

    //查询所有店铺
    public List<StoreClerk> getStoreName();

    //查询店员名称
    public StoreClerk getClerkName(@Param("clerk_name") String clerk_name, @Param("store_id") Integer store_id);

    //查询店铺店员
    public StoreClerk getClerkPhone(@Param("clerk_phone") String clerk_phone, @Param("store_id") Integer store_id);

    //根据当前用户新增店员
    public int stcAdd(StoreClerk storeClerk);

    //根据id删除当前店铺的店员
    public int stcDelete(@Param("id") Integer id);

    //根据商店id删除店员
    public int stcoDel(@Param("store_id") Integer store_id);

}
